import React from 'react';
// import Main from '../pages/main';
// import Cart from '../pages/cart';
// import Category from '../pages/category';
// import Ceo from '../pages/ceo';
// import Me from '../pages/me';
// import MyFooter from '../components/myfooter';
// import Item from '../pages/item'
// import SearchCom from '../pages/search';
// import ListCom from '../pages/list';
const Main = React.lazy(() => import("../pages/main"));
const Cart = React.lazy(() => import("../pages/cart"));
const Category = React.lazy(() => import("../pages/category"));
const Ceo = React.lazy(() => import("../pages/ceo"));
const Me = React.lazy(() => import("../pages/me"));
const Item = React.lazy(() => import("../pages/item"));
const SearchCom = React.lazy(() => import("../pages/search"));
const ListCom = React.lazy(() => import("../pages/list"));
const Login = React.lazy(() => import("../pages/login"));
const OrderSubmit = React.lazy(() => import('../pages/order/ordersubmit'));
const OrderPay = React.lazy(() => import('../pages/order/orderpay'));
const OrderList = React.lazy(() => import('../pages/order/orderlist'));

const routes = [
    { path: '/', element: <Main/>, auth: false, name: "/" },
    { path: '/category', element: <Category/>, auth: false, name: "/category" },
    { path: '/cart', element: <Cart/>, auth: true, name: "/cart" },
    { path: '/ceo', element: <Ceo/>, auth: false, name: "/ceo" },
    { path: '/me', element: <Me/>, auth: true, name: "/me" },
    { path: '/item/:id', element: <Item/>, auth: false, name: "/item" },
    { path: '/search', element: <SearchCom/>, auth: false, name: "/search" },
    { path: '/list/:searchstr', element: <ListCom/>, auth: false, name: "/list" },
    { path: '/login', element: <Login/>, auth: false, name: "/login" },
    { path: '/ordersubmit', element: <OrderSubmit/>, auth: true, name: "/ordersubmit" },
    { path: '/orderpay', element: <OrderPay/>, auth: false, name: "/orderpay" },
    { path: '/orderlist', element: <OrderList/>, auth: false, name: "/orderlist" },
]
export default routes;